package com.atguigu.lease.web.admin.service;

import com.atguigu.lease.model.entity.ApartmentInfo;
import com.atguigu.lease.model.enums.ReleaseStatus;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentDetailVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentItemVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentQueryVo;
import com.atguigu.lease.web.admin.vo.apartment.ApartmentSubmitVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author liubo
 * @description 针对表【apartment_info(公寓信息表)】的数据库操作Service
 * @createDate 2023-07-24 15:48:00
 */
public interface ApartmentInfoService extends IService<ApartmentInfo> {

    /**
     * 保存或更新公寓信息
     *
     * @param apartmentSubmitVo
     */
    void saveOrUpdateApartment(ApartmentSubmitVo apartmentSubmitVo);

    /**
     * 根据条件分页查询公寓列表
     *
     * @return
     */
    IPage<ApartmentItemVo> pageItem( Long current,Long size,ApartmentQueryVo queryVo);

    /**
     * 根据ID获取公寓详细信息
     *
     * @param id
     * @return
     */
    ApartmentDetailVo getDetailById(Long id);

    /**
     * 根据ID删除公寓信息
     * @param id
     */
    void removeApartmentById(Long id);

    /**
     * 根据ID修改公寓发布状态
     * @param id
     * @param status
     */
    void updateReleaseStatusById(Long id, ReleaseStatus status);

    /**
     * 根据区县ID查询公寓信息列表
     * @param id
     * @return
     */
    List<ApartmentInfo> listInfoByDistrictId(Long id);

    /**
     * 根据房间ID查询公寓信息
     * @param roomId
     * @return
     */
    ApartmentInfo getInfoById(Long roomId);
}
